import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class test2 {
    public static void main(String[] args) {
        String content = "{\"data\":[{\"order_id\":\"2cefca685d4511ec9840005056c00001\",\"book_id\":\"19934bfbb61d11ebbf832cf05dd6cc4c\",\n" +
                " \"book_name\":\" 儿童和青少年普拉提 5~18岁孩子的体能训练全书\",\"book_type\":\"体育/运动\",\"book_num\":\"1\",\n" +
                " \"book_price\":\"55.3\",\"book_press\":\"河南科学技术出版社\",\"id\":\"88226\"}],\"database\":\"bookorder\",\n" +
                " \"es\":1639531223000,\"id\":23,\"isDdl\":false,\"mysqlType\":{\"order_id\":\"varchar(50)\",\n" +
                " \"book_id\":\"varchar(50)\",\"book_name\":\"varchar(255)\",\"book_type\":\"varchar(10)\",\"book_num\":\"int(11)\",\n" +
                " \"book_price\":\"float\",\"book_press\":\"varchar(255)\",\"id\":\"int(11)\"},\"old\":null,\n" +
                " \"pkNames\":[\"id\"],\"sql\":\"\",\"sqlType\":{\"order_id\":12,\"book_id\":12,\"book_name\":12,\n" +
                " \"book_type\":12,\"book_num\":40,\"book_price\":7,\"book_press\":12,\"id\":4},\"table\":\"order\",\n" +
                " \"ts\":1639556137669,\"type\":\"INSERT\"}";

        String regStr1 = "order.id...\\w*";//11
        String regStr2 = "book.id...\\w*";//10
        String regStr3 = "book.name.*?book_type";//（12，l-12）
        String regStr4 = "book.type...[\\u4e00-\\u9fa5]*";//12
        String regStr5 = "book.num..\\d+";//10\.\d*
        String regStr6 = "book.price...\\d*\\.\\d*";//13
        String regStr7 = "book.press...[\\u4e00-\\u9fa5]*";//13
        String regStr8 = "id...\\d*.}";//(5,l-2)

        Pattern p = Pattern.compile(regStr8);
        Matcher m = p.matcher(content);
        if(m.find()){
            String temp = m.group(0);
            System.out.println(temp);
            int l = temp.length();
            System.out.println(temp.substring(5,l-2));
        }else{
            System.out.println("no");
        }
    }
}


//{"data":[{"order_id":"2cefca685d4511ec9840005056c00001","book_id":"19934bfbb61d11ebbf832cf05dd6cc4c",
// "book_name":" 儿童和青少年普拉提 5~18岁孩子的体能训练全书","book_type":"体育/运动","book_num":"1",
// "book_price":"55.3","book_press":"河南科学技术出版社","id":"88226"}],"database":"bookorder",
// "es":1639531223000,"id":23,"isDdl":false,"mysqlType":{"order_id":"varchar(50)",
// "book_id":"varchar(50)","book_name":"varchar(255)","book_type":"varchar(10)","book_num":"int(11)",
// "book_price":"float","book_press":"varchar(255)","id":"int(11)"},"old":null,
// "pkNames":["id"],"sql":"","sqlType":{"order_id":12,"book_id":12,"book_name":12,
// "book_type":12,"book_num":4,"book_price":7,"book_press":12,"id":4},"table":"order",
// "ts":1639556137669,"type":"INSERT"}
